# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PublisherModelCallToActionDeploy do
  @moduledoc """
  Model metadata that is needed for UploadModel or DeployModel/CreateEndpoint requests.

  ## Attributes

  *   `artifactUri` (*type:* `String.t`, *default:* `nil`) - Optional. The path to the directory containing the Model artifact and any of its supporting files.
  *   `automaticResources` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1AutomaticResources.t`, *default:* `nil`) - A description of resources that to large degree are decided by Vertex AI, and require only a modest additional configuration.
  *   `containerSpec` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ModelContainerSpec.t`, *default:* `nil`) - Optional. The specification of the container that is to be used when deploying this Model in Vertex AI. Not present for Large Models.
  *   `dedicatedResources` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DedicatedResources.t`, *default:* `nil`) - A description of resources that are dedicated to the DeployedModel, and that need a higher degree of manual configuration.
  *   `deployMetadata` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PublisherModelCallToActionDeployDeployMetadata.t`, *default:* `nil`) - Optional. Metadata information about this deployment config.
  *   `deployTaskName` (*type:* `String.t`, *default:* `nil`) - Optional. The name of the deploy task (e.g., "text to image generation").
  *   `largeModelReference` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1LargeModelReference.t`, *default:* `nil`) - Optional. Large model reference. When this is set, model_artifact_spec is not needed.
  *   `modelDisplayName` (*type:* `String.t`, *default:* `nil`) - Optional. Default model display name.
  *   `publicArtifactUri` (*type:* `String.t`, *default:* `nil`) - Optional. The signed URI for ephemeral Cloud Storage access to model artifact.
  *   `sharedResources` (*type:* `String.t`, *default:* `nil`) - The resource name of the shared DeploymentResourcePool to deploy on. Format: `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`
  *   `title` (*type:* `String.t`, *default:* `nil`) - Required. The title of the regional resource reference.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :artifactUri => String.t() | nil,
          :automaticResources =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1AutomaticResources.t() | nil,
          :containerSpec =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ModelContainerSpec.t() | nil,
          :dedicatedResources =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DedicatedResources.t() | nil,
          :deployMetadata =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PublisherModelCallToActionDeployDeployMetadata.t()
            | nil,
          :deployTaskName => String.t() | nil,
          :largeModelReference =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1LargeModelReference.t() | nil,
          :modelDisplayName => String.t() | nil,
          :publicArtifactUri => String.t() | nil,
          :sharedResources => String.t() | nil,
          :title => String.t() | nil
        }

  field(:artifactUri)

  field(:automaticResources,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1AutomaticResources
  )

  field(:containerSpec,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ModelContainerSpec
  )

  field(:dedicatedResources,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DedicatedResources
  )

  field(:deployMetadata,
    as:
      GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PublisherModelCallToActionDeployDeployMetadata
  )

  field(:deployTaskName)

  field(:largeModelReference,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1LargeModelReference
  )

  field(:modelDisplayName)
  field(:publicArtifactUri)
  field(:sharedResources)
  field(:title)
end

defimpl Poison.Decoder,
  for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PublisherModelCallToActionDeploy do
  def decode(value, options) do
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PublisherModelCallToActionDeploy.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PublisherModelCallToActionDeploy do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
